home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Auge 4000 / Auge 4000 #47 (1990-06-22)(Amiga User Gruppe Einzugsgebiet 4000).zip / Auge 4000 #47 (1990-06-22)(Amiga User Gruppe Einzugsgebiet 4000).adf / arp-pro1.3 / OLD_MANUAL / AddResidentPrg < prev    next >
Text File  |  1990-06-22  |  3KB  |  133 lines

  1.  
  2.  
  3.  
  4.      AddResidentPrg(33.4)     ARP Prog Manual      AddResidentPrg(33.4)
  5.  
  6.  
  7.  
  8.      NAME
  9.       AddResidentPrg -- Add    a program to the resident list.
  10.  
  11.      SYNOPSIS
  12.       node = AddResidentPrg(segment, name)
  13.         d0              d1      a0
  14.  
  15.      FUNCTION
  16.       ARP's    Resident Program manager is a sort of software MMU
  17.       that attempts    to allow programs to run multiple times    with
  18.       only one copy    of their code in memory. The result is similar
  19.       to Unix(tm) shared text processes.  Provisions have been
  20.       made to allocate extra data segments for programs that are
  21.       not reentrant, these are allocated automatically if the
  22.       program begins with a    ResidentProgramTag and is also on the
  23.       resident list.  Additionally,    the ResidentProgramTag stores
  24.       a min    stacksize needed to run    the program, this is used and
  25.       overrides all    user stack requests whether or not the program
  26.       is on    the Resident list.
  27.  
  28.       A program does not need to have a ResidentProgramTag to be
  29.       installed on the resident list.  Programs are    checksummed
  30.       upon being added, and    checked    each time they are obtained.
  31.       While    not perfect, this provides a reasonable    method of
  32.       weeding out most non-resident    programs.  As a    general    guide,
  33.       all ARP programs currently will run as resident programs.
  34.       Most current C programs modify their data, and so cannot be
  35.       run without using the    ResidentProgramTag to allocate and
  36.       copy data.  Programs which write into    their own code
  37.       segments, such as those which    do SegList splits, will    never
  38.       run as Resident, and will likely never run under a hardware
  39.       MMU either.  Some programs, such as MicroSmith's TxED, check
  40.       to see if they are on    the ResidentList before    doing a
  41.       seglist split.  These    should be ok as    resident.
  42.  
  43.       All names on the resident list are stored using their
  44.       BaseName's only.  Matches will succeed if you    specify    a full
  45.       pathname, but    the match only examines    the basename of    each.
  46.  
  47.       This list is protected using a signal    semaphore in ArpBase,
  48.       so the overall impact    on the system for searches is very
  49.       low.    Generally, you will not    need to    obtain this semaphore
  50.       for yourself,    since all these    functions (except
  51.       CheckSumPrg()) handle    the locking of the list    for you.  In
  52.       general, these functions do not need to be called, you
  53.       should usually use the higher    level LoadPrg()    UnLoadPrg()
  54.       functions instead.
  55.  
  56.      INPUTS
  57.       segment - BPTR as returned by    LoadSeg().
  58.  
  59.       name - pointer to a null terminated pathname.     This may be
  60.  
  61.  
  62.  
  63.      Page 1                         (printed 2/22/88)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      AddResidentPrg(33.4)     ARP Prog Manual      AddResidentPrg(33.4)
  71.  
  72.  
  73.  
  74.           any valid AmigaDOS pathname, but only    the BaseName
  75.           of the path is compared and stored. Note that    the
  76.           resident name    does not need to be the    same as    the
  77.           original diskfile name.
  78.  
  79.      RESULT
  80.       node - If found, a pointer to    the resident program node for
  81.           the program.    If NULL, it could not be added.    Note
  82.           that it is impossible    to add the same    name twice to
  83.           the resident list.  On failure, more information is
  84.           available by calling IoErr().
  85.  
  86.      BUGS
  87.       None known
  88.  
  89.      SEE ALSO
  90.       ObtainResidentPrg(), RemResidentPrg(), LoadPrg(),
  91.       UnLoadPrg(), CheckSumPrg(), ReleaseResidentPrg(),
  92.       BaseName().
  93.  
  94.      AUTHOR
  95.       SDB
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.      Page 2                         (printed 2/22/88)
  130.  
  131.  
  132.  
  133.